Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(1.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(9.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(9.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(9.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 10)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(9.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 1.0)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(9.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 1.0)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(9.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 1.0)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
library(MCMCpack)
Y1 <- mvrnorm(1000, c(9.8, .1), cbind(c(1, -.6), c(-.6, 10)))
Y2 <- mvrnorm(1000, c(0,0), cbind(c(1, .2), c(.2, 1.0)))
diff <- colMeans(Y1) - colMeans(Y2)
diff_p <- matrix(NA, 1000, 2)
pp <- rep(NA, 1000)
for(i in 1:1000)
{
ind <- sample(c(1,2), size=1000, replace=T)
Y1_p <- rbind(Y1[ind == 1,], Y2[ind == 1,])
Y2_p <- rbind(Y1[ind == 2,], Y2[ind == 2,])
diff_p[i,] <- colMeans(Y1_p) - colMeans(Y2_p)
pp[i] <- ifelse(sum(diff > (colMeans(Y1_p) - colMeans(Y2_p))) == 2, 1, 0)
}
mean(pp)
#####################################
## "Backyard politics in Foreign Aid"
## William Christiansen
## Tobias Heinrich
## Timothy Peterson
#####################################
## Files that executes the script for the
## preregistration
rm(list=ls())
## Set working directory
##########################
setwd("/Users/th5/Dropbox/Projects/NIMBY/experiment/preregistration/Dataverse")
#setwd("/Users/tobiasheinrich/Dropbox/Projects/NIMBY/preregistration/analysis")
#setwd("/Users/timothypeterson/documents/Dropbox/NIMBY/preregistration/analysis")
dir.create(path="output", showWarnings = FALSE)
## Load packages, scripts
#########################
library(foreign)
library(matrixStats)
library(plyr)
library(geosphere)
library(randomForest)
library(stringr)
library(stargazer)
library(zipcode)
data(zipcode)
library(scales)
library(RItools)
#library(MBESS)
library(ggmap)
library(reshape2)
library(rms)
source("Rx_Auxiliary functions.R")
dir.create(path="output", showWarnings = FALSE)
source("R1_Make website files.R")
source("R2_Prep MTurk data.R")
source("R3_Balance and descriptives.R")
## Files that executes the script for the
## preregistration
rm(list=ls())
## Set working directory
##########################
setwd("/Users/th5/Dropbox/Projects/NIMBY/experiment/preregistration/Dataverse")
#setwd("/Users/tobiasheinrich/Dropbox/Projects/NIMBY/preregistration/analysis")
#setwd("/Users/timothypeterson/documents/Dropbox/NIMBY/preregistration/analysis")
dir.create(path="output", showWarnings = FALSE)
## There's some incompability issue in the most current (12/1/2016) ggplot version
## with ggmap. This is for descriptives
install_version("ggplot2", version = "2.1.0", repos = "http://cran.us.r-project.org")
## Load packages, scripts
#########################
library(foreign)
library(matrixStats)
library(plyr)
library(geosphere)
library(randomForest)
library(stringr)
library(stargazer)
library(zipcode)
data(zipcode)
library(scales)
library(RItools)
#library(MBESS)
library(ggmap)
library(reshape2)
library(rms)
source("Rx_Auxiliary functions.R")
## 1) Generate files used in the survey experiment
source("R1_Make website files.R")
## Files that executes the script for the
## preregistration
rm(list=ls())
## Set working directory
##########################
setwd("/Users/th5/Dropbox/Projects/NIMBY/experiment/preregistration/Dataverse")
#setwd("/Users/tobiasheinrich/Dropbox/Projects/NIMBY/preregistration/analysis")
#setwd("/Users/timothypeterson/documents/Dropbox/NIMBY/preregistration/analysis")
dir.create(path="output", showWarnings = FALSE)
## There's some incompability issue in the most current (12/1/2016) ggplot version
## with ggmap. This is for descriptives.
library(devtools)
install_version("ggplot2", version = "2.1.0", repos = "http://cran.us.r-project.org")
install.packages("devtools")
## Files that executes the script for the
## preregistration
rm(list=ls())
## Set working directory
##########################
setwd("/Users/th5/Dropbox/Projects/NIMBY/experiment/preregistration/Dataverse")
#setwd("/Users/tobiasheinrich/Dropbox/Projects/NIMBY/preregistration/analysis")
#setwd("/Users/timothypeterson/documents/Dropbox/NIMBY/preregistration/analysis")
dir.create(path="output", showWarnings = FALSE)
## There's some incompability issue in the most current (12/1/2016) ggplot version
## with ggmap. This is for descriptives.
library(devtools)
install_version("ggplot2", version = "2.1.0", repos = "http://cran.us.r-project.org")
## Load packages, scripts
#########################
library(foreign)
library(matrixStats)
library(plyr)
library(geosphere)
library(randomForest)
library(stringr)
library(stargazer)
library(zipcode)
data(zipcode)
library(scales)
library(RItools)
#library(MBESS)
library(ggmap)
library(reshape2)
library(rms)
source("Rx_Auxiliary functions.R")
## 1) Generate files used in the survey experiment
source("R1_Make website files.R")
## 2) Prepare data from the MTurk output
source("R2_Prep MTurk data.R")
## 3) Check balance
source("R3_Balance and descriptives.R")
## Set number of bootstrap draws
n_bs <- 200
source("R4_Estimate models.R")
source("R5_Make main graph.R")
source("R6_Regression tables.R")
#####################################
## "Backyard politics in Foreign Aid"
## William Christiansen
## Tobias Heinrich
## Timothy Peterson
#####################################
## Files that executes the script for the
## preregistration
rm(list=ls())
## Set working directory
##########################
setwd("/Users/th5/Dropbox/Projects/NIMBY/experiment/preregistration/Dataverse")
#setwd("/Users/tobiasheinrich/Dropbox/Projects/NIMBY/preregistration/analysis")
#setwd("/Users/timothypeterson/documents/Dropbox/NIMBY/preregistration/analysis")
dir.create(path="output", showWarnings = FALSE)
## There's some incompability issue in the most current (12/1/2016) ggplot version
## with ggmap. This is for descriptives.
library(devtools)
install_version("ggplot2", version = "2.1.0", repos = "http://cran.us.r-project.org")
## Load packages, scripts
#########################
library(foreign)
library(matrixStats)
library(plyr)
library(geosphere)
library(randomForest)
library(stringr)
library(stargazer)
library(zipcode)
data(zipcode)
library(scales)
library(RItools)
#library(MBESS)
library(ggmap)
library(reshape2)
library(rms)
source("Rx_Auxiliary functions.R")
## 1) Generate files used in the survey experiment
source("R1_Make website files.R")
## 2) Prepare data from the MTurk output
source("R2_Prep MTurk data.R")
## 3) Check balance
source("R3_Balance and descriptives.R")
## 4) Estimation of models
## Set number of bootstrap draws
n_bs <- 5000
source("R4_Estimate models.R")
## 5) Main graph
source("R5_Make main graph.R")
## 6) Regression tables
source("R6_Regression tables.R")
warnings()
